package cc.deng.wubo.minapp.beans.game;

import cc.deng.wubo.minapp.core.base.BaseModel;
import org.nutz.dao.DB;
import org.nutz.dao.entity.annotation.*;
import org.nutz.json.JsonField;

import java.util.Date;

@Table("gm_user_info")
public class GmUserInfo extends BaseModel{
    @Id
   // @JsonField(forceString = true)
    @Prev({
            @SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(id),0)+1 FROM gm_user_info"),
            @SQL(db= DB.ORACLE,value = "SELECT COALESCE(MAX(id),0)+1 FROM gm_user_info")
    })
    @Column
    private Long id;

    @Column
    @Comment("游戏用户id")
    private Long gmUserId;

    @Column
    @Comment("金币数量")
    private long gmCoin;

    @One(field = "gmUserId")
    private GmUser gmUser;

    @Column
    @Comment("last_check_dt")
    private Date lastCheckDT;

    @Column("checking_days")
    @Comment
    private int checkingDays;

    @Column("checking_times")
    @Comment
    private int checkingTimes;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGmUserId() {
        return gmUserId;
    }

    public void setGmUserId(Long gmUserId) {
        this.gmUserId = gmUserId;
    }

    public long getGmCoin() {
        return gmCoin;
    }

    public void setGmCoin(long gmCoin) {
        this.gmCoin = gmCoin;
    }

    public GmUser getGmUser() {
        return gmUser;
    }

    public void setGmUser(GmUser gmUser) {
        this.gmUser = gmUser;
    }

    public Date getLastCheckDT() {
        return lastCheckDT;
    }

    public void setLastCheckDT(Date lastCheckDT) {
        this.lastCheckDT = lastCheckDT;
    }

    public int getCheckingDays() {
        return checkingDays;
    }

    public void setCheckingDays(int checkingDays) {
        this.checkingDays = checkingDays;
    }

    public int getCheckingTimes() {
        return checkingTimes;
    }

    public void setCheckingTimes(int checkingTimes) {
        this.checkingTimes = checkingTimes;
    }
}
